home *** CD-ROM | disk | FTP | other *** search
- diff --unified --recursive --new-file ./Makefile.in ../colirc/Makefile.in
- --- ./Makefile.in Wed Jan 4 22:40:23 1995
- +++ ../colirc/Makefile.in Sun Dec 17 14:51:53 1995
- @@ -27,7 +27,7 @@
-
- # Where the ircII binary will be installed.
- # 'make install' will compile and install the program
- -INSTALL_IRC = $(bindir)/irc
- +INSTALL_IRC = $(bindir)/colirc
-
- # Where the ircII library will be. Generally this is the place that
- # you put the scripts, help pages and translation tables. It is
- @@ -181,7 +181,7 @@
- installbin: installirc installserv installflush installwserv
-
- installirc: irc installdirs
- - $(INSTALL) source/irc $(INSTALL_IRC)-$(VERSION)
- + $(INSTALL) source/colirc $(INSTALL_IRC)-$(VERSION)
- @if test -f $(INSTALL_IRC).old; then $(RM) $(INSTALL_IRC).old; fi
- @if test -f $(INSTALL_IRC); then $(MV) $(INSTALL_IRC) $(INSTALL_IRC).old; fi
- $(RM) $(INSTALL_IRC)
- diff --unified --recursive --new-file ./README.colirc ../colirc/README.colirc
- --- ./README.colirc Wed Dec 31 16:00:00 1969
- +++ ../colirc/README.colirc Sun Dec 17 17:52:16 1995
- @@ -0,0 +1,28 @@
- +colirc patch 0.11 <ircii 2.8.2>
- +bitching and whatnot goes to escrafrd@oz.net <MadHacker on LinuxNet>
- +
- +/color to change color of nicks
- +/set colorline on to turn on full line color <default off>
- +/rcolor to set colors picked to colorise nicks
- +
- +_USAGE_
- +
- +colors: black red green brown blue purple cyan white
- +for bright colors prefix b to the color <bred for bright red, etc>
- +
- +/color nick color
- +/rcolor +color or -color <-all and +all can be used>
- +/rcolor can accept multiple args </rcolor -all +red +green +blue>
- +
- +notes...
- +
- +if a nick does not have a color set to it<with /color> then it will have one
- +assigned to it based on the first two chars of the nick. the colors assigned
- +can be picked with /rcolor. default is all colors except black.
- +
- +if you have colorline set on, the whole line said by a person will be the
- +color of thier nick.
- +
- +you can change the color of channels if you are in multiple channels at
- +once. </set #channel green>
- +
- diff --unified --recursive --new-file ./include/color.h ../colirc/include/color.h
- --- ./include/color.h Wed Dec 31 16:00:00 1969
- +++ ../colirc/include/color.h Sun Dec 17 14:51:53 1995
- @@ -0,0 +1,32 @@
- +#ifndef _COLOR_H_
- +#define _COLOR_H_
- +/* define colors as control chars */
- +#define BLACK '\027'
- +#define RED BLACK+1
- +#define GREEN BLACK+2
- +#define BROWN BLACK+3
- +#define BLUE BLACK+4
- +#define PURPLE BLACK+5
- +#define CYAN BLACK+6
- +#define WHITE BLACK+7
- +#define BRIGHT '\025'
- +
- +#define SAY_COLOR BLUE
- +
- +#ifndef TRUE
- +#define TRUE 1
- +#endif
- +
- +typedef struct _name_color
- +{
- + char *name;
- + char colorstr[5];
- + struct _name_color *next;
- +} name_color;
- +
- +extern void colorcmd _((char *, char *, char *));
- +extern void rcolorcmd _((char *, char *, char *));
- +char *color_of();
- +name_color *find_nc_name();
- +char *tolower_str();
- +#endif /* _COLOR_H_ */
- diff --unified --recursive --new-file ./include/config.h ../colirc/include/config.h
- --- ./include/config.h Fri Jan 20 17:36:03 1995
- +++ ../colirc/include/config.h Sun Dec 17 17:50:39 1995
- @@ -152,6 +152,7 @@
- #define DEFAULT_CLOCK_24HOUR 1
- #define DEFAULT_CLOCK_ALARM NULL
- #define DEFAULT_CMDCHARS "/"
- +#define DEFAULT_COLORLINE 0
- #define DEFAULT_COMMAND_MODE 0
- #define DEFAULT_CONTINUED_LINE " "
- #define DEFAULT_DCC_BLOCK_SIZE 512
- diff --unified --recursive --new-file ./include/config.h.dist ../colirc/include/config.h.dist
- --- ./include/config.h.dist Mon Oct 17 04:58:26 1994
- +++ ../colirc/include/config.h.dist Sun Dec 17 14:51:53 1995
- @@ -23,7 +23,7 @@
- * to your nearest servers. However if you use a seperate 'ircII.servers'
- * file and the ircII can find it, this setting is overridden.
- */
- -#define DEFAULT_SERVER "change.this.to.a.server"
- +#define DEFAULT_SERVER "irc.cabi.net"
-
- /*
- * Uncomment the following if the gecos field of your /etc/passwd has other
- @@ -153,6 +153,7 @@
- #define DEFAULT_CLOCK_24HOUR 1
- #define DEFAULT_CLOCK_ALARM NULL
- #define DEFAULT_CMDCHARS "/"
- +#define DEFAULT_COLORLINE 0
- #define DEFAULT_COMMAND_MODE 0
- #define DEFAULT_CONTINUED_LINE "+"
- #define DEFAULT_DCC_BLOCK_SIZE 512
- diff --unified --recursive --new-file ./include/irc.h ../colirc/include/irc.h
- --- ./include/irc.h Mon Jan 2 05:31:40 1995
- +++ ../colirc/include/irc.h Sun Dec 17 17:52:46 1995
- @@ -12,7 +12,7 @@
- #ifndef __irc_h
- #define __irc_h
-
- -#define IRCII_COMMENT "this is a bug free client. honest"
- +#define IRCII_COMMENT "colirc"
-
- #define IRCRC_NAME "/.ircrc"
-
- diff --unified --recursive --new-file ./include/vars.h.proto ../colirc/include/vars.h.proto
- --- ./include/vars.h.proto Fri Jan 6 07:23:36 1995
- +++ ../colirc/include/vars.h.proto Sun Dec 17 14:51:53 1995
- @@ -50,6 +50,7 @@
- #define CLOCK_24HOUR_VAR $
- #define CLOCK_ALARM_VAR $
- #define CMDCHARS_VAR $
- +#define COLORLINE_VAR $
- #define COMMAND_MODE_VAR $
- #define CONTINUED_LINE_VAR $
- #define DCC_BLOCK_SIZE_VAR $
- diff --unified --recursive --new-file ./source/Makefile.in ../colirc/source/Makefile.in
- --- ./source/Makefile.in Thu Dec 29 03:02:44 1994
- +++ ../colirc/source/Makefile.in Sun Dec 17 15:40:20 1995
- @@ -15,14 +15,14 @@
- LN = @LN@
- RM = @RM@
-
- -OBJECTS = alias.o crypt.o ctcp.o dcc.o debug.o edit.o exec.o flood.o\
- +OBJECTS = alias.o color.o crypt.o ctcp.o dcc.o debug.o edit.o exec.o flood.o\
- funny.o help.o history.o hold.o hook.o if.o ignore.o input.o\
- irc.o ircaux.o ircsig.o keys.o lastlog.o list.o log.o mail.o\
- menu.o names.o newio.o notice.o notify.o numbers.o output.o\
- parse.o queue.o reg.o scandir.o screen.o server.o stack.o\
- status.o term.o translat.o vars.o whois.o window.o $(PP_OBJS)
-
- -SOURCES = alias.c crypt.c ctcp.c dcc.c debug.o edit.c exec.c flood.c\
- +SOURCES = alias.c color.c crypt.c ctcp.c dcc.c debug.o edit.c exec.c flood.c\
- funny.c help.c history.c hold.c hook.c if.c ignore.c input.c\
- irc.c ircaux.c ircsig.c keys.c lastlog.c list.c log.c mail.c\
- menu.c names.c newio.c notice.c notify.c numbers.c output.c\
- @@ -42,7 +42,7 @@
- default:
- (cd ..;make)
-
- -all: irc
- +all: colirc
-
- # got I hate typos.
- clena: clean
- @@ -50,12 +50,12 @@
- .c.o:
- $(CC) $(CFLAGS) $(DEFS) $(PP_DEFS) $(INCLUDES) -c $<
-
- -irc: $(OBJECTS)
- - $(CC) $(CFLAGS) $(LDFLAGS) $(DEFS) -o irc $(OBJECTS) $(LIBS)
- +colirc: $(OBJECTS)
- + $(CC) $(CFLAGS) $(LDFLAGS) $(DEFS) -o colirc $(OBJECTS) $(LIBS)
- clean::
- - $(RM) irc $(OBJECTS)
- + $(RM) colirc $(OBJECTS)
-
- -install: irc
- +install: colirc
- cd ..; $(MAKE) install
-
- # .o files needing special compilation flags
- @@ -141,6 +141,8 @@
- ../include/history.h ../include/vars.h ../include/ircaux.h ../include/server.h \
- ../include/screen.h ../include/window.h ../include/hold.h ../include/lastlog.h \
- ../include/menu.h ../include/input.h ../include/names.h ../include/output.h
- +color.o: color.c ../include/irc.h ../include/color.h ../include/vars.h \
- + ../include/output.h
- crypt.o: crypt.c ../include/irc.h ../include/defs.h ../include/config.h ../include/irc_std.h \
- ../include/debug.h ../include/crypt.h ../include/vars.h ../include/ircaux.h \
- ../include/list.h ../include/ctcp.h ../include/output.h
- @@ -164,7 +166,8 @@
- ../include/keys.h ../include/names.h ../include/alias.h ../include/history.h \
- ../include/funny.h ../include/ctcp.h ../include/dcc.h ../include/translat.h \
- ../include/output.h ../include/exec.h ../include/notify.h ../include/numbers.h \
- - ../include/status.h ../include/if.h ../include/help.h ../include/stack.h ../include/queue.h
- + ../include/status.h ../include/if.h ../include/help.h ../include/stack.h \
- + ../include/queue.h ../include/color.h
- exec.o: exec.c ../include/irc.h ../include/defs.h ../include/config.h ../include/irc_std.h \
- ../include/debug.h ../include/exec.h ../include/vars.h ../include/ircaux.h ../include/edit.h \
- ../include/window.h ../include/hold.h ../include/lastlog.h ../include/menu.h \
- @@ -267,13 +270,14 @@
- ../include/debug.h ../include/output.h ../include/vars.h ../include/input.h \
- ../include/term.h ../include/lastlog.h ../include/window.h ../include/hold.h \
- ../include/edit.h ../include/menu.h ../include/screen.h ../include/hook.h ../include/ctcp.h \
- - ../include/log.h
- + ../include/log.h ../include/color.h
- parse.o: parse.c ../include/irc.h ../include/defs.h ../include/config.h ../include/irc_std.h \
- ../include/debug.h ../include/server.h ../include/names.h ../include/window.h \
- ../include/hold.h ../include/lastlog.h ../include/edit.h ../include/menu.h ../include/vars.h \
- ../include/ctcp.h ../include/hook.h ../include/ignore.h ../include/whois.h ../include/ircaux.h \
- ../include/funny.h ../include/crypt.h ../include/term.h ../include/flood.h ../include/screen.h \
- - ../include/output.h ../include/numbers.h ../include/parse.h ../include/notify.h
- + ../include/output.h ../include/numbers.h ../include/parse.h ../include/notify.h \
- + ../include/color.h
- queue.o: queue.c ../include/irc.h ../include/defs.h ../include/config.h ../include/irc_std.h \
- ../include/debug.h ../include/alias.h ../include/ircaux.h ../include/output.h \
- ../include/edit.h ../include/if.h ../include/queue.h
- @@ -285,7 +289,7 @@
- ../include/lastlog.h ../include/edit.h ../include/menu.h ../include/output.h \
- ../include/vars.h ../include/server.h ../include/list.h ../include/term.h ../include/names.h \
- ../include/ircaux.h ../include/input.h ../include/log.h ../include/hook.h ../include/dcc.h \
- - ../include/translat.h ../include/exec.h
- + ../include/translat.h ../include/exec.h ../include/color.h
- server.o: server.c ../include/irc.h ../include/defs.h ../include/config.h ../include/irc_std.h \
- ../include/debug.h ../include/server.h ../include/ircaux.h ../include/whois.h \
- ../include/lastlog.h ../include/exec.h ../include/window.h ../include/hold.h \
- @@ -299,7 +303,7 @@
- ../include/vars.h ../include/hook.h ../include/input.h ../include/edit.h ../include/window.h \
- ../include/hold.h ../include/lastlog.h ../include/menu.h ../include/screen.h \
- ../include/mail.h ../include/output.h ../include/names.h ../include/ircaux.h \
- - ../include/translat.h
- + ../include/translat.h ../include/color.h
- term.o: term.c ../include/irc.h ../include/defs.h ../include/config.h ../include/irc_std.h \
- ../include/debug.h ../include/term.h ../include/translat.h ../include/window.h \
- ../include/hold.h ../include/lastlog.h ../include/edit.h ../include/menu.h ../include/screen.h
- diff --unified --recursive --new-file ./source/color.c ../colirc/source/color.c
- --- ./source/color.c Wed Dec 31 16:00:00 1969
- +++ ../colirc/source/color.c Sun Dec 17 15:48:16 1995
- @@ -0,0 +1,310 @@
- +/* a color irc hack similar to circ, with some more features...
- + * since the source for circ was not found, this is completely from scratch
- + * bugs, ideas, and whatnot can be sent to escrafrd@oz.net <MadHacker on LinuxNet>
- + */
- +
- +#include "irc.h"
- +#include "output.h"
- +#include "vars.h"
- +#include "color.h"
- +
- +char rcolors[16]={0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1};
- +char colorstring[5];
- +name_color *nc_start = NULL;
- +name_color *nc_last = NULL;
- +
- +void
- +rcolorcmd(command, args, subargs)
- + char *command,
- + *args,
- + *subargs;
- +{
- + char *arg;
- + char colorstr[5];
- + int x;
- + int bright;
- + int char_;
- + char brightstr[]="bright ";
- + char *selectstr[2]= {"deselected", "selected"};
- + char rcolors_str[17];
- +
- + while ((int)(arg = next_arg(args, &args)) != NULL)
- + {
- + bright=0;
- + char_=1;
- + brightstr[0] = 'b';
- + if (arg[0] != '-' && arg[0] != '+')
- + {
- + say("%s is a bad argument for /rcolor", arg);
- + continue;
- + }
- + if (!strcmp(arg, "-all"))
- + {
- + for (x = 0; x < 16; x++)
- + rcolors[x] = 0;
- + say("all colors deselected");
- + }
- + else if (!strcmp(arg, "+all"))
- + {
- + for (x = 0; x < 16; x++)
- + rcolors[x] = 1;
- + say("all colors selected");
- + }
- + else
- + {
- +/* color_to_i(arg+1, colorstr);*/
- + x = 0;
- + do {
- +
- + switch (tolower(arg[char_]))
- + {
- + case 'b':
- + if (!strcmp(arg+char_, "black"))
- + {
- + x = BLACK;
- + }
- + else if (!strcmp(arg+char_, "blue"))
- + {
- + x = BLUE;
- + }
- + else if (!strcmp(arg+char_, "brown"))
- + {
- + x = BROWN;
- + }
- + else
- + {
- + bright = TRUE;
- + char_++;
- + }
- + break;
- + case 'c':
- + x = CYAN;
- + break;
- + case 'g':
- + x = GREEN;
- + break;
- + case 'r':
- + x = RED;
- + break;
- + case 'p':
- + x = PURPLE;
- + break;
- + case 'w':
- + x = WHITE;
- + break;
- + default:
- + put_it("YOU DUMBASS, THAT'S NOT A COLOR");
- + return;
- + }
- + } while (bright && x == 0);
- +
- + if (x == 0) return;
- + x -= BLACK;
- + if (bright) {x += 8;}
- + else brightstr[0] = '\0';
- + rcolors[x] = 0;
- + if (arg[0] == '+') rcolors[x] = 1;
- + say("%s%s %s", brightstr, arg+char_, selectstr[rcolors[x]]);
- + }
- +
- + }
- +
- +}
- +
- +char *
- +tolower_str(string)
- + char *string;
- +{
- + char *lower_str;
- + int x;
- +
- + lower_str = (char *)new_malloc(strlen(string)+1);
- + for (x = 0; x <= strlen(string); x++)
- + lower_str[x] = tolower(string[x]);
- + lower_str[x] = '\0';
- + return lower_str;
- +}
- +
- +void
- +colorcmd(command, args, subargs)
- + char *command,
- + *args,
- + *subargs;
- +{
- + char *name, *color;
- + char colorstr[5];
- + name_color *nc;
- + int bright;
- + char brightstr[]="bright ";
- + char *lower_name;
- + int x;
- +
- +
- + if (((int)(name = next_arg(args, &args)) != NULL) &&
- + ((int)(color = next_arg(args, &args)) != NULL))
- + {
- + colorstr[0] = '\0';
- + bright = 0;
- + do {
- +
- + switch (tolower(color[0]))
- + {
- + case 'b':
- + if (!strcmp(color, "black"))
- + {
- + colorstr[0] = BLACK;
- + }
- + else if (!strcmp(color, "blue"))
- + {
- + colorstr[0] = BLUE;
- + }
- + else if (!strcmp(color, "brown"))
- + {
- + colorstr[0] = BROWN;
- + }
- + else
- + {
- + bright = TRUE;
- + color++;
- + }
- + break;
- + case 'c':
- + colorstr[0] = CYAN;
- + break;
- + case 'g':
- + colorstr[0] = GREEN;
- + break;
- + case 'r':
- + colorstr[0] = RED;
- + break;
- + case 'p':
- + colorstr[0] = PURPLE;
- + break;
- + case 'w':
- + colorstr[0] = WHITE;
- + break;
- + default:
- + put_it("YOU DUMBASS, THAT'S NOT A COLOR");
- + return;
- + }
- + } while (bright && colorstr[0] == '\0');
- + colorstr[1] = '\0';
- + if (bright)
- + {
- + colorstr[1] = BRIGHT;
- + colorstr[2] = '\0';
- + }
- + if (nc = find_nc_name(name))
- + {
- + strcat(nc->colorstr, colorstr);
- + }
- + else
- + {
- + nc = (name_color *) new_malloc(sizeof(name_color));
- + nc->name = (char *) new_malloc(strlen(name)+1);
- + lower_name = (char *) new_malloc(strlen(name)+1);
- + for (x = 0; x <= strlen(name); x++)
- + lower_name[x] = tolower(name[x]);
- + strcpy(nc->name, lower_name);
- + new_free(&lower_name);
- + strcpy(nc->colorstr, colorstr);
- + if (nc_start == NULL)
- + {
- + nc_start = nc;
- + nc_last = nc;
- + nc->next = NULL;
- + }
- + else
- + {
- + nc_last->next = nc;
- + nc_last = nc;
- + nc->next = NULL;
- + }
- + }
- + if (bright)
- + {
- + strcpy(brightstr, "bright ");
- + }
- + else brightstr[0] = '\0';
- + say("%s is now %s%s", nc->name, brightstr, color);
- + }
- + else
- + {
- + say("Usage: /COLOR name color");
- + say("colors: black red green brown blue purple cyan white");
- + say("for bright colors prefix b to the color <bred for bright red, etc>");
- + }
- +}
- +
- +char *
- +color_of(name)
- + char *name;
- +{
- + int i=0;
- + name_color *nc;
- + int x,y;
- +
- + if (nc = find_nc_name(name))
- + {
- + return nc->colorstr;
- + }
- + else
- + {
- +/* colorstring[i++]=(name[0]+name[1]) % 8 + BLACK;*/
- + /* black foreground is a 'bad thing'(TM) ;) */
- +/* if (colorstring[i-1] == BLACK) colorstring[i-1]++;
- + if (((name[0]+name[1]) % 16) > 8) colorstring[i++]=BRIGHT;
- + colorstring[i]='\0';
- + return colorstring;*/
- + /* count number of selected colors */
- + for (x = 0, y = 0; x < 16; x++)
- + if (rcolors[x] == 1) y++;
- + if (y == 0)
- + {
- + colorstring[0] = WHITE;
- + colorstring[1] = '\0';
- + return colorstring;
- + }
- + i = (name[0]+name[1]) % y;
- + i++;
- + for (x = 0, y = 0; y < i; x++)
- + if (rcolors[x] == 1) y++;
- + i = 0;
- + x--;
- + if (x < 8)
- + {
- + colorstring[i++] = x + BLACK;
- + }
- + else
- + {
- + colorstring[i++] = (x - 8) + BLACK;
- + colorstring[i++] = BRIGHT;
- + }
- + colorstring[i] = '\0';
- + return colorstring;
- + }
- +}
- +
- +name_color *
- +find_nc_name(name)
- + char *name;
- +{
- + name_color *nc;
- + char *lower_name;
- + int x;
- +
- + lower_name = (char *) new_malloc(strlen(name)+1);
- + for (x = 0; x <= strlen(name); x++)
- + lower_name[x] = tolower(name[x]);
- + for (nc = nc_start; nc != NULL; nc = nc->next)
- + {
- + if (!strcmp(nc->name, lower_name))
- + {
- + new_free(&lower_name);
- + return nc;
- + }
- + }
- + new_free(&lower_name);
- + return NULL;
- +}
- +
- diff --unified --recursive --new-file ./source/ctcp.c ../colirc/source/ctcp.c
- --- ./source/ctcp.c Fri Jan 6 07:16:34 1995
- +++ ../colirc/source/ctcp.c Sun Dec 17 17:34:37 1995
- @@ -34,6 +34,7 @@
- #include "dcc.h"
- #include "names.h"
- #include "parse.h"
- +#include "color.h"
-
- #define CTCP_SHUTUP 0
- #define CTCP_VERBOSE 1
- @@ -669,20 +670,24 @@
- *to,
- *cmd;
- {
- + char cline[3];
- +
- if (cmd && *cmd)
- {
- int old;
-
- old = set_lastlog_msg_level(LOG_ACTION);
- + cline[0] = WHITE; cline[1] = '\0';
- + if (get_int_var(COLORLINE_VAR)) strcpy(cline, color_of(from));
- if (is_channel(to))
- {
- message_from(to, LOG_ACTION);
- if (do_hook(ACTION_LIST, "%s %s %s", from, to, cmd))
- {
- if (is_current_channel(to, 0))
- - put_it("* %s %s", from, cmd);
- + put_it("* %s%s %s%s%c ", color_of(from), from, cline, cmd, WHITE);
- else
- - put_it("* %s:%s %s", from, to, cmd);
- + put_it("* %s%s%c:%s%s %s%s%c ", color_of(from), from, WHITE, color_of(to), to, cline, cmd, WHITE);
- }
- }
- else
- diff --unified --recursive --new-file ./source/edit.c ../colirc/source/edit.c
- --- ./source/edit.c Mon Apr 3 07:48:21 1995
- +++ ../colirc/source/edit.c Sun Dec 17 14:51:53 1995
- @@ -52,6 +52,7 @@
- #include "help.h"
- #include "stack.h"
- #include "queue.h"
- +#include "color.h"
-
- /*
- * current_exec_timer - used to make sure we don't remove a timer
- @@ -207,6 +208,8 @@
- { "CD", NULL, cd, 0 },
- { "CHANNEL", "JOIN", e_channel, 0 },
- { "CLEAR", NULL, clear, 0 },
- + { "COLOR", NULL, colorcmd, 0 },
- + { "COLOUR", NULL, colorcmd, 0 },
- { "COMMENT", NULL, comment, 0 },
- { "CONNECT", "CONNECT", send_comm, 0 },
- { "CTCC", NULL, dcc, 0 },
- @@ -269,6 +272,8 @@
- { "QUIT", "QUIT", e_quit, NONOVICEABBREV},
- { "QUOTE", NULL, quote, 0 },
- { "RBIND", 0, rbindcmd, 0 },
- + { "RCOLOR", NULL, rcolorcmd, 0 },
- + { "RCOLOUR", NULL, rcolorcmd, 0 },
- { "REDIRECT", NULL, redirect, 0 },
- { "REHASH", "REHASH", send_comm, 0 },
- { "REQUEST", NULL, ctcp, 0 },
- diff --unified --recursive --new-file ./source/names.c ../colirc/source/names.c
- --- ./source/names.c Thu Apr 6 20:37:25 1995
- +++ ../colirc/source/names.c Sun Dec 17 14:51:53 1995
- @@ -24,6 +24,7 @@
- #include "lastlog.h"
- #include "list.h"
- #include "output.h"
- +#include "color.h"
-
- static char mode_str[] = "iklmnpst";
-
- @@ -552,6 +553,7 @@
- {
- ChannelList *chan;
- NickList *tmp;
- + name_color *nc;
-
- for (chan = channel_list; chan; chan = chan->next)
- {
- @@ -561,6 +563,11 @@
- {
- new_free(&tmp->nick);
- malloc_strcpy(&tmp->nick, new_nick);
- + if (nc = find_nc_name(old_nick))
- + {
- + new_free(&nc->name);
- + nc->name = tolower_str(new_nick);
- + }
- }
- }
- }
- diff --unified --recursive --new-file ./source/output.c ../colirc/source/output.c
- --- ./source/output.c Fri Jan 6 07:16:56 1995
- +++ ../colirc/source/output.c Sun Dec 17 14:51:53 1995
- @@ -27,6 +27,7 @@
- #include "hook.h"
- #include "ctcp.h"
- #include "log.h"
- +#include "color.h"
-
- int in_help = 0;
-
- @@ -159,14 +160,16 @@
- #endif
- if (window_display)
- {
- - putbuf[0] = putbuf[1] = putbuf[2] = '*';
- - putbuf[3] = ' ';
- + putbuf[0] = SAY_COLOR;
- + putbuf[1] = putbuf[2] = putbuf[3] = '*';
- + putbuf[4] = ' ';
- + putbuf[5] = WHITE;
- #ifdef USE_STDARG_H
- va_start(vl, format);
- - vsprintf(&putbuf[4], format, vl);
- + vsprintf(&putbuf[6], format, vl);
- va_end(vl);
- #else
- - sprintf(&putbuf[4], format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
- + sprintf(&putbuf[6], format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
- #endif
- add_to_log(irclog_fp, putbuf);
- add_to_screen(putbuf);
- diff --unified --recursive --new-file ./source/parse.c ../colirc/source/parse.c
- --- ./source/parse.c Sun Jan 15 22:22:55 1995
- +++ ../colirc/source/parse.c Sun Dec 17 17:45:41 1995
- @@ -35,6 +35,7 @@
- #include "numbers.h"
- #include "parse.h"
- #include "notify.h"
- +#include "color.h"
-
- #define STRING_CHANNEL '+'
- #define MULTI_CHANNEL '#'
- @@ -437,12 +438,16 @@
- *to;
- char *high;
- int no_flood;
- + char bwhite[]= {WHITE, BRIGHT, '\0'};
- + char cline[3];
-
- if (!from)
- return;
- PasteArgs(Args, 1);
- to = Args[0];
- ptr = Args[1];
- + cline[0] = WHITE; cline[1] = '\0';
- + if (get_int_var(COLORLINE_VAR)) strcpy(cline, color_of(from));
- if (!to || !ptr)
- return;
- if (is_channel(to))
- @@ -549,15 +554,14 @@
- doing_privmsg = 1;
- if (no_flood && do_hook(list_type, "%s %s %s", from,
- to, ptr))
- - put_it("%s<%s>%s %s", high, from, high, ptr);
- + put_it("%s<%s%s%s> %s%s%c ", bwhite, color_of(from), from, bwhite, cline, ptr, WHITE);
- doing_privmsg = 0;
- break;
- case PUBLIC_OTHER_LIST:
- doing_privmsg = 1;
- if (no_flood && do_hook(list_type, "%s %s %s", from,
- to, ptr))
- - put_it("%s<%s:%s>%s %s", high, from, to, high,
- - ptr);
- + put_it("%s<%s%s%s:%s%s%s> %s%s%c ", bwhite, color_of(from), from, bwhite, color_of(to), to, bwhite, cline, ptr, WHITE);
- doing_privmsg = 0;
- break;
- }
- diff --unified --recursive --new-file ./source/screen.c ../colirc/source/screen.c
- --- ./source/screen.c Mon Apr 3 07:48:28 1995
- +++ ../colirc/source/screen.c Sun Dec 17 14:51:54 1995
- @@ -35,6 +35,7 @@
- #include "dcc.h"
- #include "translat.h"
- #include "exec.h"
- +#include "color.h"
-
- Window *to_window;
- Screen *current_screen;
- @@ -440,7 +441,17 @@
- {
- switch (*ptr)
- {
- + case BLACK:
- + case BLUE:
- + case GREEN:
- + case CYAN:
- + case RED:
- + case PURPLE:
- + case BROWN:
- + case WHITE:
- + case BRIGHT:
- case REV_TOG:
- +
- case UND_TOG:
- case BOLD_TOG:
- case ALL_OFF:
- @@ -510,6 +521,16 @@
- bold = display_bold(TOGGLE);
- bold = 1 - bold;
- }
- + if (*ptr >= BLACK && *ptr <= WHITE)
- + {
- + fflush(current_screen->fpout);
- + fprintf(current_screen->fpout, "\e[0;3%dm", *ptr - BLACK);
- + }
- + if (*ptr == BRIGHT)
- + {
- + fflush(current_screen->fpout);
- + fprintf(current_screen->fpout, "\e[1m");
- + }
- str = ++ptr;
- break;
- case '\007':
- @@ -1146,6 +1167,16 @@
- buffer[pos++] = *ptr;
- col++;
- break;
- + case BLACK:
- + case BLUE:
- + case GREEN:
- + case CYAN:
- + case RED:
- + case PURPLE:
- + case BROWN:
- + case WHITE:
- + case BRIGHT:
- +
- case UND_TOG:
- case ALL_OFF:
- case REV_TOG:
- diff --unified --recursive --new-file ./source/status.c ../colirc/source/status.c
- --- ./source/status.c Mon Apr 3 07:48:30 1995
- +++ ../colirc/source/status.c Sun Dec 17 14:51:54 1995
- @@ -28,6 +28,7 @@
- #include "names.h"
- #include "ircaux.h"
- #include "translat.h"
- +#include "color.h"
-
- extern time_t time();
-
- @@ -603,7 +604,8 @@
- {
- RJustifyPos = i;
- }
- - else if (buffer[i] != REV_TOG && buffer[i] != UND_TOG && buffer[i] != ALL_OFF && buffer[i] != BOLD_TOG)
- + else if (buffer[i] != REV_TOG && buffer[i] != UND_TOG && buffer[i] != ALL_OFF && buffer[i] != BOLD_TOG
- + && (buffer[i] < BLACK || buffer[i] > WHITE) && buffer[i] != BRIGHT)
- {
- if (RealPosition == CO)
- {
- @@ -662,7 +664,8 @@
- {
- if (buffer[i] != window->status_line[i])
- break;
- - if (buffer[i] != REV_TOG && buffer[i] != UND_TOG && buffer[i] != ALL_OFF && buffer[i] != BOLD_TOG)
- + if (buffer[i] != REV_TOG && buffer[i] != UND_TOG && buffer[i] != ALL_OFF && buffer[i] != BOLD_TOG
- + && (buffer[i] < BLACK || buffer[i] > WHITE) && buffer[i] != BRIGHT)
- RealPosition++;
- }
- }
- @@ -1209,6 +1212,16 @@
- {
- switch(*s)
- {
- + case BLACK:
- + case BLUE:
- + case GREEN:
- + case CYAN:
- + case RED:
- + case PURPLE:
- + case BROWN:
- + case WHITE:
- + case BRIGHT:
- +
- case UND_TOG:
- case ALL_OFF:
- case REV_TOG:
- diff --unified --recursive --new-file ./source/vars.c ../colirc/source/vars.c
- --- ./source/vars.c Wed Jan 4 22:39:56 1995
- +++ ../colirc/source/vars.c Sun Dec 17 14:51:54 1995
- @@ -89,7 +89,8 @@
- { "CLOCK_24HOUR", BOOL_TYPE_VAR, DEFAULT_CLOCK_24HOUR, NULL, reset_clock, 0, 0 },
- { "CLOCK_ALARM", STR_TYPE_VAR, 0, NULL, set_alarm, 0, 0 },
- { "CMDCHARS", STR_TYPE_VAR, 0, NULL, NULL, 0, 0 },
- - { "COMMAND_MODE", BOOL_TYPE_VAR, DEFAULT_COMMAND_MODE, NULL, NULL, 0, 0 },
- + { "COLORLINE", BOOL_TYPE_VAR, DEFAULT_COLORLINE, NULL, NULL, 0, 0 },
- + { "COMMAND_MODE", BOOL_TYPE_VAR, DEFAULT_COMMAND_MODE, NULL, NULL, 0, 0 },
- { "CONTINUED_LINE", STR_TYPE_VAR, 0, NULL, set_continued_line, 0, 0 },
- { "DCC_BLOCK_SIZE", INT_TYPE_VAR, DEFAULT_DCC_BLOCK_SIZE, NULL, NULL, 0, 0 },
- { "DEBUG", INT_TYPE_VAR, 0, NULL, NULL, 0, 0 },
-